<!--
  @author liuying
  @date 2018/11/21 15:36
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<html th:replace="~{work/modify/common/layout :: layout('false', ~{::title}, ~{::content}, ~{::script})}">
    <title>复制订单</title>

    <link rel="stylesheet" href="/static/style/order/order.css" media="all">
</head>
<body>

<div th:fragment="content">
    <div class="layui-fluid new-order-page update-order-page">
        <div class="layui-card">
            <form method="post" action="" class="layui-form" lay-filter="zmn-order-add-form">
                <input type="hidden" id="platWork" th:value="${orderInfo.platWork}"/>
                <input type="hidden" name="plat" id="plat" th:value="${orderInfo.plat}"/>
                <input type="hidden" name="bizType" id="bizType" th:value="${orderInfo.bizType}"/>
                <input type="hidden" name="longitude" id="longitude" th:value="${orderInfo.longitude}"/>
                <input type="hidden" name="latitude"  id="latitude" th:value="${orderInfo.latitude}"/>
                <input type="hidden" id="district"/>
                <input type="hidden" name="servItemType" id="servItemType" th:value="${servItemType}"/>

                <input type="hidden" name="isCopy" id="isCopy" th:value="1"/>
                <input type="hidden" name="copyWorkId" id="copyWorkId" th:value="${orderInfo.workId}"/>
                <input type="hidden" name="copyOrderId" id="copyOrderId" th:value="${orderInfo.orderId}"/>
                <input type="hidden" name="requestId" id="requestId"  th:value="${orderInfo.requestId}" />
                <!--<input type="hidden" name="copyMasterId" id="copyMasterId" th:value="${orderInfo.masterId}">
                <input type="hidden" name="copyMasterName" id="copyMasterName" th:value="${orderInfo.masterName}">-->

                <input type="hidden" name="receiveEntranceId" id="receiveEntranceId" value="1003"/>
                <!-- 全部复制为新单 -->
                <input type="hidden" name="type" id="type" th:value="1"/>

                <!--预分配服务商-->
                <input type="hidden" id="preManageCompanyId" name="preManageCompanyId">
                <input type="hidden" id="preManageCompanyName" name="preManageCompanyName">
                <!--地址info-->
                <input type="hidden" id="streetSource" name="streetSource" th:value="${orderInfo.streetSource}">
                <input type="hidden" id="communityId" th:value="${orderInfo.streetId}">
                <!--<div class="layui-card-header" style="margin-top:10px;"><b>基本信息</b></div>-->
                <div class="layui-split">&nbsp;</div>

                <div th:with="product=${orderInfo.orderProductList[0]}">
                    <!-- 用户电话 -->
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label layui-form-required">用户电话</label>
                            <div class="layui-input-inline" style="width: 200px;">
                                <!-- 联系电话1 -->
                                <input class="layui-input"
                                       id="telephone"
                                       type="text"
                                       name="telephone"
                                       lay-verify="required|mobile"
                                       placeholder="电话01"
                                       autocomplete="off"
                                       th:value="${orderInfo.hideTelephone}"
                                       th:data-val="${orderInfo.hideTelephone}"
                                       th:data-real-val="${orderInfo.telephone}"
                                       th:disabled="${disabledFields != null} ? ${disabledFields.contains('telephone')}">
                            </div>
                            <label class="layui-form-label">用户电话</label>
                            <div class="layui-input-inline" style="width: 200px;">
                                <!-- 用户电话2 -->
                                <input class="layui-input"
                                       id="telephone2"
                                       type="text"
                                       name="telephone2"
                                       th:value="${orderInfo.hideTelephone2}"
                                       th:data-val="${orderInfo.hideTelephone2}"
                                       th:data-real-val="${orderInfo.telephone2}"
                                       lay-verify="tel"
                                       placeholder="电话02"
                                       autocomplete="off" >
                            </div>
                            <div class="layui-input-inline" style="width: 200px;">
                                <!-- 用户电话3 -->
                                <input class="layui-input"
                                       id="telephone3"
                                       type="text"
                                       name="telephone3"
                                       th:value="${orderInfo.hideTelephone3}"
                                       th:data-val="${orderInfo.hideTelephone3}"
                                       th:data-real-val="${orderInfo.telephone3}"
                                       lay-verify="tel"
                                       placeholder="电话03"
                                       autocomplete="off" >
                            </div>
                        </div>
                    </div>
                    <!-- 用户姓名、下单渠道 -->
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label layui-form-required">客户姓名</label>
                            <div class="layui-input-inline" style="width: 200px;">
                                <th:block th:replace="common/_orderAddTmpl :: inputOfUserName"/>
                            </div>
                            <label class="layui-form-label layui-form-required">下单渠道</label>
                            <div class="layui-input-inline" style="width: 410px;">
                                <select id="channelId" name="channelId" lay-verify="required" lay-filter="channelId" lay-search>
                                    <option value=""></option>
                                    <option th:each="channel : ${channelList}"
                                            th:value="${channel.value}"
                                            th:text="|${channel.text}-${channel.value}|"
                                            th:selected="${channel.value == orderInfo.channelId}"
                                            th:plat="${channel.ext1}"
                                            th:disabled="${channel.disabled}">
                                    </option>
                                </select>
                            </div>
                        </div>
                    </div>
                    <!-- 用户性别 -->
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label layui-form-required">性别</label>
                            <div class="layui-input-inline" style="width: 230px;">
                                <input type="radio"
                                       name="gender"
                                       lay-verify="radio"
                                       th:each="item : ${gender}"
                                       th:value="${item.value}"
                                       th:title="${item.text}"
                                       th:checked="${item.value == orderInfo.gender}">
                            </div>
                            <label class="layui-form-label" id="externalShopLabel">外部平台店铺</label>
                            <div class="layui-input-inline" style="width: 380px;">
                                <div id="externalShopInfo"></div>
                            </div>
                        </div>
                    </div>
                    <!-- 用户地址-省、市 -->
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label layui-form-required">用户地址</label>
                            <div class="layui-input-inline" style="width: 200px;">
                                <select id="provinceId" name="provinceId" lay-verify="required" lay-filter="province" lay-search>
                                    <option value="">省</option>
                                    <option th:each="province : ${provinceList}"
                                            th:value="${province.value}"
                                            th:text="${province.text}"
                                            th:selected="${province.value == orderInfo.provinceId}">
                                    </option>
                                </select>
                            </div>
                            <div class="layui-input-inline select-city">
                                <select id="cityId" name="cityId" lay-verify="required" lay-filter="city" lay-search>
                                    <option value="">市</option>
                                    <option th:each="city : ${cityList}"
                                            th:value="${city.value}"
                                            th:text="${city.text}"
                                            th:selected="${city.value == orderInfo.cityId}">
                                    </option>
                                </select>
                            </div>
                            <div class="layui-form-mid layui-word-aux">
                                <span id="company" class="company" th:text="${orderInfo.companyName}"></span>
                            </div>
                            <a class="layui-form-mid zmn-btn-text" id="preCompany"></a>
                            <div class="layui-form-mid layui-word-aux layui-hide" id="gridCompany"></div>
                        </div>
                    </div>
                    <!-- 服务区域 -->
                    <!--<div id="service-area" class="layui-form-item service-area" style="display: none">-->
                    <!--<label class="layui-form-label">服务区域</label>-->
                    <!--<div class="layui-input-inline" id="area-list"  style="width: 515px;">-->
                    <!--</div>-->
                    <!--<div class="layui-input-inline layui-word-aux" style="width: 200px; font-size: 12px;padding: 4px 0!important">-->
                    <!--绿色：可服务；<br>-->
                    <!--灰色：不可服务；<br>-->
                    <!--红色：当前地址所在区-->
                    <!--</div>-->
                    <!--</div>-->
                    <!-- 用户地址-区县、街道 -->
                    <div id="fuzzy-address" class="layui-form-item"  th:classappend="${(orderInfo.streetSource == 0 && orderInfo.streetId == 0) || orderInfo.streetSource != 3} ? 'layui-hide'">
                        <div class="layui-inline">
                            <label class="layui-form-label"></label>
                            <div class="layui-input-inline" style="width: 200px;">
                                <select id="countyId" name="countyId" lay-filter="countyId" lay-search  th:value="${orderInfo.countyId}">
                                    <option value="">请选择区县</option>
                                    <option th:each="county : ${countyList}"
                                            th:value="${county.value}"
                                            th:text="${county.text}"
                                            th:selected="${county.value == orderInfo.countyId}">
                                    </option>
                                </select>
                            </div>
                            <div class="layui-input-inline select-city">
                                <select id="streetId"
                                        name="streetId"
                                        lay-filter="streetId"
                                        lay-search
                                        th:value="${orderInfo.streetId}">
                                    <option value="">请选择乡镇或街道</option>
                                    <option th:each="street : ${streetList}"
                                            th:value="${street.areaId}"
                                            th:text="${street.name}"
                                            th:data-longitude="${street.longitude}"
                                            th:data-latitude="${street.latitude}"
                                            th:selected="${street.areaId == orderInfo.streetId}">
                                    </option>
                                </select>
                            </div>
                        </div>
                    </div>
                    <!-- 用户地址-map -->
                    <div id="exact-address" class="layui-form-item" th:classappend="${(orderInfo.streetSource == 0 && orderInfo.streetId != 0) || orderInfo.streetSource == 3} ? 'layui-hide'">
                        <div class="layui-inline">
                            <label class="layui-form-label" ></label>
                            <div class="layui-input-inline input-large" id="street-wrapper">
                                <input class="layui-input"
                                       id="customerAddress"
                                       type="text"
                                       name="street"
                                       th:value="${orderInfo.street}"
                                       lay-verify="required"
                                       placeholder="搜索地点，选择小区，街道，大厦..."
                                       autocomplete="off"
                                       style="padding-right: 95px;">
                                <!--<select id="customerAddress" name="street" lay-verify="" lay-filter="street" lay-search>-->
                                <!--<option value="">搜索地点，选择小区，街道，大厦...</option>-->
                                <!--</select>-->
                                <!--搜索建议-->
                                <button id="btn-map" class="layui-btn layui-btn-normal" style="position: absolute;top: 0;right: 0;">百度地图</button>
                                <div id="suggestPanel" class="suggestPanelBox layui-anim layui-anim-upbit">
                                    <ul></ul>
                                </div>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <div class="layui-input-inline" id="county-list">
                            </div>
                        </div>
                    </div>
                    <!-- 用户地址-门牌 -->
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label"></label>
                            <div class="layui-input-inline input-large">
                                <input class="layui-input"
                                       type="text"
                                       name="address"
                                       th:value="${orderInfo.address}"
                                       maxlength="100"
                                       placeholder="请输入详细楼栋、门牌号"
                                       autocomplete="off">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <!-- 疫情插入 -->
                            <div id="divEpidemicControlTip"  class="layui-input-inline"></div>
                        </div>
                    </div>
                    <!-- 切换精确地址与模糊地址 -->
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label"></label>
                            <div class="layui-input-inline input-large">
                                <a class="btn-duty-time"  th:classappend="${(orderInfo.streetSource == 0 && orderInfo.streetId != 0) || orderInfo.streetSource == 3} ? 'layui-hide'" id="address-type-exact" href="javascript:void(0);">无法找到精确地址</a>
                                <a class="btn-duty-time"  th:classappend="${(orderInfo.streetSource == 0 && orderInfo.streetId == 0) || orderInfo.streetSource != 3} ? 'layui-hide'" id="address-type-fuzzy" href="javascript:void(0);" >切换为精确地址</a>
                            </div>
                        </div>
                    </div>
                    <!-- 服务分类、订单类型 -->
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label layui-form-required">服务分类</label>
                            <div class="layui-input-inline" style="width: 200px;">
                                <select id="servCategoryId" name="servCategId" lay-verify="required" lay-filter="servCategory" lay-search>
                                    <option value="">全部</option>
                                    <option th:each="item : ${servCategList}"
                                            th:value="${item.value}"
                                            th:text="${item.text}"
                                            th:selected="${item.value == orderInfo.servCategId}">
                                    </option>
                                </select>
                            </div>

                            <label class="layui-form-label layui-form-required" >服务类型</label>

                            <div class="layui-input-inline" style="width: 230px;">
                                <input type="radio"
                                       name="productShowType"
                                       th:each="item : ${productShowType}"
                                       th:value="${item.value}"
                                       th:title="${item.text}"
                                       th:checked="${item.value==orderInfo.productShowType}"
                                       lay-verify="required"
                                       lay-filter="product-showtype" th:disabled="${isHaveQuote != null && isHaveQuote && item.value == 1}">
                            </div>

                        </div>
                    </div>
                    <!-- 服务产品、产品数量、品牌 -->
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label layui-form-required" >服务产品</label>

                            <div th:class="|layui-input-inline ${1 == orderInfo.productShowType?'layui-hide':''}|" style="width: 200px;" id="dv-show-product">
                                <select class="product-select"
                                        id="showProduct"
                                        name="showProductId"
                                        lay-filter="showProduct"
                                        lay-search>
                                    <option value="">请选择</option>
                                    <option th:each="item : ${showServProductList}"
                                            th:value="${item.value}"
                                            th:text="${item.text}"
                                            th:selected="${item.value == orderInfo.showProductId}"
                                            data-th-data-unit="${ item.ext1 }"
                                            data-th-data-type="${ item.type }"
                                            data-th-data-pid="${ item.pid }">
                                    </option>
                                </select>
                            </div>

                            <div th:class="|layui-input-inline ${2 == orderInfo.productShowType?'layui-hide':''}|"  style="width: 200px;" id="dv-product">
                                <select class="product-select"
                                        id="product"
                                        name="productId"
                                        style="display: none"
                                        lay-filter="product"
                                        lay-search>
                                    <option value="">请选择</option>
                                    <option th:each="item : ${servProductList}"
                                            th:value="${item.value}"
                                            th:text="${item.text}"
                                            th:selected="${item.value == orderInfo.productId}"
                                            data-th-data-unit="${ item.ext1 }"
                                            data-th-data-type="${ item.type }"
                                            data-th-data-pid="${ item.pid }">
                                    </option>
                                </select>
                            </div>

                            <label class="layui-form-label layui-form-required" >产品数量</label>
                            <div class="layui-input-inline input-mini">
                                <input class="layui-input"
                                       id="count"
                                       type="text"
                                       name="number"
                                       placeholder="数量"
                                       autocomplete="off"
                                       min="1"
                                       max="10"
                                       lay-verify="required|count"
                                       style="padding-right: 40px"
                                       th:value="${product.number}">
                                <span class="order-number-unit" id="unit" th:text="${(product.productUnit != null && product.productUnit != '')? product.productUnit : product.showProductUnit}"></span>
                            </div>
                            <div class="layui-input-inline input-mini">
                                <select id="brand" name="brandId" lay-verify="brand" lay-filter="brand" lay-search>
                                    <option value="">品牌</option>
                                    <option th:each="item : ${brandList}"
                                            th:value="${item.value}"
                                            th:text="${item.text}"
                                            th:selected="${item.value == product.brandId}">
                                    </option>
                                </select>
                            </div>
                            <span id="order-duplicate-tips" style="color: red;margin-left: 30px"></span>
                        </div>
                    </div>

                    <!-- 报价方式 -->
                    <div class="layui-form-item" id="quoteTypeDiv" th:classappend="${isHaveQuote} ? '' : hidden">
                        <div class="layui-inline"  >
                            <label class="layui-form-label layui-form-required" >报价方式</label>
                            <div class="layui-input-inline" style="width: 300px;">
                                <input type="radio"
                                       name="quoteType"
                                       id="quoteTypeFaultPhen"
                                       value="1"
                                       title="故障现象报价"
                                       lay-verify="required"
                                       lay-filter="quoteType"
                                       th:checked="${orderInfo.quoteType == 1}"
                                       class="layui-input-inline"
                                       th:disabled="${faultPhenList == null || faultPhenList.size() <= 0}">
                                <input type="radio"
                                       id="quoteTypeServiceItem"
                                       name="quoteType"
                                       value="2"
                                       title="服务项报价"
                                       lay-verify="required"
                                       lay-filter="quoteType"
                                       th:checked="${orderInfo.quoteType == 2}"
                                       class="layui-input-inline">
                            </div>
                        </div>
                    </div>
                    <!-- 服务项目 -->
                    <div class="layui-form-item" id="serviceItemDiv" th:classappend="${isHaveQuote && orderInfo.quoteType == 2 && itemList != null} ? '' : hidden">
                        <label class="layui-form-label layui-form-required">服务项目</label>
                        <div class="layui-input-inline" style="width: 200px">
                            <select id="serviceItem" name="itemId" lay-verify="serviceItem" lay-filter="serviceItem" lay-search>
                                <option value="">请选择服务项目</option>
                                <option th:each="item : ${itemList}"
                                        th:value="${item.value}"
                                        th:text="${item.text}"
                                        th:selected="${item.value == orderInfo.itemId}">
                                </option>
                            </select>
                        </div>
                    </div>
                    <!-- 故障现象 -->
                    <div class="layui-form-item" id="faultPhenDiv"  th:classappend="${ isHaveQuote && orderInfo.quoteType == 1 && faultPhenList != null && faultPhenList.size() > 0} ? '' : hidden" style="width: 600px">
                        <label class="layui-form-label layui-form-required">故障现象</label>
                        <div class="layui-input-block" id="faultPhen">
                            <input type="radio"
                                   name="phenId"
                                   th:each="item : ${faultPhenList}"
                                   th:value="${item.value}"
                                   th:title="${item.text}"
                                   th:checked="${item.value==orderInfo.phenId}"
                                   lay-filter="faultPhen">
                        </div>
                    </div>
                    <!-- 产品类别 -->
                    <div class="layui-form-item line_dan" id="productCategDiv" th:classappend="${isHaveQuote && categList != null} ? '' : hidden">
                        <label class="layui-form-label layui-form-required productCategTip">产品类别</label>
                        <div class="layui-block">
                            <div class="layui-input-inline" id="productCateg">
                                <input type="radio"
                                       name="productCategId"
                                       th:each="item : ${categList}"
                                       th:value="${item.categId}"
                                       th:title="|${item.categName}  /  ${#moneyUtil.parseToYuan(item.minPrice)} ~ ${#moneyUtil.parseToYuan(item.maxPrice)} 元|"
                                       th:checked="${item.categId==orderInfo.categId}"
                                       lay-filter="productCateg">
                            </div>
                        </div>
                    </div>
                    <!-- 产品型号 -->
                    <div class="layui-form-item line_dan" id="productNameDiv" th:classappend="${isHaveQuote && quoteProductList != null} ? '' : hidden">
                        <label class="layui-form-label layui-form-required quoteProductTip">产品型号</label>
                        <div class="layui-input-inline" id="quoteProduct">
                            <input type="radio"
                                   name="quoteProduct"
                                   th:each="item : ${quoteProductList}"
                                   th:value="${item.productId}"
                                   th:title="|${item.tariffName}  /  ${#moneyUtil.parseToYuan(item.price)} 元|"
                                   th:checked="${item.productId==orderInfo.productId}"
                                   th:data-item-id="${item.itemId}"
                                   th:data-price="${item.price}"
                                   lay-filter="quoteProduct">
                        </div>
                    </div>

                    <div id="advanceQuotePrice" class="advanceQuotePrice" style="display: none">
                        <iframe id="advanceQuotePriceTable" class="advanceQuotePriceTable">
                        </iframe>
                    </div>

                    <!-- 常见故障-->
                    <div class="layui-form-item" id="faultDiv"  th:styleappend="${subsidiaryList == null || subsidiaryList.isEmpty() || (isHaveQuote != null && isHaveQuote) } ? 'display: none' ">
                        <div class="layui-inline">
                            <label class="layui-form-label" >常见故障</label>
                            <div class="layui-input-block faults-wrapper" id="faults-wrapper">
                                <input type="checkbox"
                                       name="faultIdList"
                                       lay-skin="primary"
                                       th:each="fault : ${subsidiaryList}"
                                       th:title="${fault.text}"
                                       th:value="${fault.value}"
                                       th:checked="${product.faultIdList != null && product.faultIdList.contains(fault.value)}">
                            </div>
                        </div>
                    </div>
                    <!-- 其他故障 -->
                    <div class="layui-form-item otherFault" th:styleappend="${isHaveQuote != null && isHaveQuote} ? 'display: none' ">
                        <div class="layui-inline">
                            <label class="layui-form-label">其他故障</label>
                            <div class="layui-input-inline textarea-new-order">
                                <textarea class="layui-textarea"
                                          id="fault-remark"
                                          name="faultRemark"
                                          th:text="${product.remark}"
                                          placeholder="请输入内容"></textarea>
                            </div>
                        </div>
                    </div>
                    <!-- 应付总价 -->
                    <div class="layui-form-item" id="amount-wrapper" style="display: none;">
                        <div class="layui-inline">
                            <label class="layui-form-label">价格</label>
                            <div class="layui-input-inline layui-inline-text" id="amount-detail" style="width:auto;display: none;">
                                <span id="amount" style="color: red;"></span>&nbsp;&nbsp;
                                总价<span id="totalAmount" style="color: red;"></span>
                                <button class="layui-btn" style="padding: 0;"></button>
                            </div>
                            <div class="layui-input-inline layui-inline-text" id="amount-others">
                                <a class="btn-duty-time" id="btn-price-table" href="javascript:void(0);">查看价格表</a>
                                <button class="layui-btn" style="padding: 0;"></button>
                            </div>
                            <div class="layui-input-inline layui-inline-text" id="amount-quotation" style="display: none;">
                                <span>计价器工单，用户根据故障自行报价</span>
                                <a class="btn-duty-time" id="btn-price-fault" href="javascript:void(0);">查看价格表</a>
                                <button class="layui-btn" style="padding: 0;"></button>
                            </div>
                            <div class="layui-input-inline layui-inline-text" id="amount-advance-pay" style="display: none;">
                                <span>提前付工单，用户根据故障自行报价</span>
                                <a class="btn-duty-time" id="btn-price-advance-pay" href="javascript:void(0);">查看价格表</a>
                                <button class="layui-btn" style="padding: 0;"></button>
                            </div>
                            <div class="layui-input-inline layui-inline-text" id="amount-quotation-three" style="display: none;">
                                <span id="amount-quotation-three-text"></span>
                                <a class="btn-duty-time" id="btn-price-quotation-three" href="javascript:void(0);">查看价格表</a>
                                <button class="layui-btn" style="padding: 0;"></button>
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item" id="discount-wrapper" style="display: none;">
                        <div class="layui-inline">
                            <label class="layui-form-label">优惠</label>
                            <div class="layui-input-inline layui-inline-text" id="no-discount"
                                 style="display: none;">
                                <span>无满足条件的促销活动和优惠券</span>
                            </div>
                            <div class="layui-input-inline layui-inline-text" style="color:red">
                                <span id="used-discount"></span>
                            </div>
                            <div class="layui-input-inline layui-inline-text" id="discount">
                                <a class="btn-duty-time" id="btn-discount" @click="readDiscountFunc(index)"
                                   href="javascript:void(0);">查看优惠信息</a>
                                <button class="layui-btn" style="padding: 0;"></button>
                            </div>
                        </div>
                    </div>
                    <!-- 最大优惠 -->
                    <div class="layui-form-item duty-time-item" id="max-discount-div" style="display: none;">
                        <label class="layui-form-label"></label>
                        <div class="layui-input-inline" style="width:440px">
                            <input
                                    id="send-discount-checkbox"
                                    type="checkbox"
                                    lay-skin="primary"
                                    name="sendDiscountFlag"
                                    lay-filter="sendDiscountFlag"
                                    style="color: red !important;">
                        </div>
                    </div>
                    <div id="show-discount-div" style="margin-left: 100px;" class="hidden">
                    </div>
                    <!-- 预约时间 -->
                    <div class="layui-form-item duty-time-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">预约时间</label>
                            <div class="layui-input-inline layui-inline-text" id="duty-time-wrapper">
                                <input type="hidden" name="dutyStatus"  th:value="2"/>
                                <span id="duty-time" th:text="${dutyTime}"></span>
                                <a class="btn-duty-time" id="btn-duty-time" href="javascript:void(0);">选择预约时间</a>
                                <button class="layui-btn" style="padding: 0;"></button>
                                <input id="duty-time-input"
                                       type="hidden"
                                       name="dutyTime"
                                       th:value="${dutyTime}"
                                       lay-verify="dutyTime"
                                       style="padding: 0;">
                            </div>
                            <div class="layui-input-inline">
                                <input id="duty-time-checkbox"
                                       type="checkbox"
                                       lay-skin="primary"
                                       name=""
                                       lay-filter="duty-time-checkbox"
                                       title="客户不确定上门时间">
                            </div>
                            <div class="layui-input-inline">
                                <div class="layui-input-inline-text text-red" id="gird-group-distribute-master"></div>
                            </div>
                            <!--<div class="layui-input-inline">
                                <div class="layui-input-inline-text text-red" id="auto-distribute-time"></div>
                            </div>-->
                        </div>
                    </div>
                    
                    <!-- 下单备注 -->
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">下单备注</label>
                            <div class="layui-input-inline textarea-new-order">
                                <textarea class="layui-textarea" name="remark" maxlength="1000" th:text="${orderInfo.remark}" placeholder="最长不超1000个字符" ></textarea>
                            </div>
                            <span style="color: red;">注意：此处备注工程师APP、用户可见。</span>
                        </div>
                    </div>
                    <!-- 下单标志 -->
                    <div class="layui-form-item" th:if="${#orderAuthPermit.checkPermitByPlat(orderInfo.platWork, '/work/copy/test.action')}">
                        <div class="layui-inline">
                            <label class="layui-form-label">下单标志</label>
                            <div class="layui-input-inline" style="width: 230px">
                                <input type="radio"
                                       name="test"
                                       lay-verify="radio"
                                       th:value="1"
                                       th:title="正常工单"
                                       th:checked="${orderInfo.test == 1}"/>
                                <input type="radio"
                                       name="test"
                                       lay-verify="radio"
                                       th:value="2"
                                       th:title="测试工单"
                                       th:checked="${orderInfo.test == 2}"/>
                            </div>
                        </div>
                    </div>
                    <!--<div class="layui-form-item" th:if="${orderInfo.take}">
                        <div class="layui-inline">
                            <label class="layui-form-label">加单推荐</label>
                            <div class="layui-input-inline" style="width: 230px">
                                <input type="radio"
                                       name="addOrder"
                                       lay-verify="radio"
                                       th:value="2"
                                       th:title="是"
                                       th:checked="checked"/>
                                <input type="radio"
                                       name="addOrder"
                                       lay-verify="radio"
                                       th:value="1"
                                       th:title="否"/>
                            </div>
                        </div>
                    </div>-->
                    <!-- 按钮 -->
                    <div class="layui-form-item">
                        <label class="layui-form-label"></label>
                        <div class="layui-input-block">
                            <div>
                                <button id="confirmbtn" type="submit" class="layui-btn" lay-submit lay-filter="confirmbtn">保存</button>
                                <button id="sendOrderTransferFailMessageBtn" type="button" th:classappend="${isHaveQuote} ? '' : hidden" class="layui-btn">发送挽留短信</button>
                                <span id="spanEpidemicControlTip"></span>
                                <!--<button type="reset" class="layui-btn layui-btn-primary">重置</button>-->
                            </div>
                        </div>
                    </div>
                    <div style="height: 1px"></div>
                </div>
            </form>
        </div>
    </div>
</div>

<script th:inline="javascript">
    var json = {
        servProductList: [[${servProductList}]],
        cityList: [[${cityList}]],
        orderExternalShop: [[${orderExternalShop}]],
        channelList: [[${channelList}]]
    };
    var addOrderWebAk = [[${#baiduAkUtil.getAddOrderWebAk()}]];
    var specialFaultPhenId = [[${specialFaultPhenId}]];
    var layuiModel = {
        oms_work_modify_copy: "work/modify/zmn.oms.work.modify.copy"
    };
</script>
</body>
</html>